package com.xjgc.msibase.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 外围系统接口服务
 * @Author: 小逗号
 * @Date: 2023-10-30
 * @Version: V1.0
 */
@Data
@TableName("msi_exo_system_server")
public class MsiExoSystemServer implements Serializable {
    private static final long serialVersionUID = 1L;
    public static final String WEBSERVICE = "WS";
    public static final String REST = "REST";
    public static final String POST = "POST";
    public static final String GET = "GET";

    /**
     * 系统id
     */
    private String exoSystemId;
    /**
     * 系统名
     */
    private String exoSystemCode;
    /**
     * 服务接口类型
     */
    @Dict(dicCode = "msi_server_type")
    private String exoServerType;
    /**
     * 服务接口名
     */
    private String exoServerCode;
    /**
     * 服务接口描述
     */
    private String exoServerDesc;

    private String restMethod;
    private String restAddress;
    /**
     * Rest接口 jsonKey
     */
    private String jsonKey;
    /**
     * 私密的
     */
    private boolean secret;
    /**
     * token认证类
     */
    private String tokenClass;
    /**
     * token参数方式 heard/body
     */
    private String tokenMode;
    /**
     * token参数KEY
     */
    private String tokenKey;

    private String webService;

    /**
     * 常量
     */
    private String constant;

    /**
     * 状态
     */
    @Dict(dicCode = "status")
    private String status;


    public static final String HEARD = "heard";
    public static final String BODY = "body";


    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    /**
     * 创建人
     */
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 更新人
     */
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 所属部门
     */
    private String sysOrgCode;
}
